all:FINS
#COMPILE = arm-openwrt-linux-
CC = $(COMPILE)gcc
CXX = $(COMPILE)g++ 
DEBUGE=-g
CXXFLAGS = -std=c++11 -Wall -DOPENSSL -I./src $(DEBUGE)

SRTIP = $(COMPILE)strip

OUTPUT_DIR = build
cppSrc:=$(wildcard */*.cpp)

objects:=$(patsubst %c,%o,$(srcs))
objects+=$(patsubst %cpp,%o,$(cppSrc))
target=$(addprefix $(OUTPUT_DIR)/,$(notdir $(objects)))

$(shell mkdir -p $(OUTPUT_DIR))

$(OUTPUT_DIR):
	mkdir -p $(OUTPUT_DIR)





$(OUTPUT_DIR)/%.o : */%.cpp
	$(CXX) -c $< -o $@  $(CXXFLAGS)

FINS:$(target)
	$(CXX) $(target) -o FINS 
#	$(SRTIP)  $@

.PHONY : clean
clean:
	rm $(OUTPUT_DIR)/*.o  FINS
	
